package com.dl.study.config.jwt;

import com.dl.study.config.propertites.JwtProperties;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.shiro.authc.AuthenticationToken;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;

/**
 * @Author: user
 * @Date: 2021/10/22 14:03
 * @Description:
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EnableConfigurationProperties({JwtProperties.class})
public class JwtToken implements AuthenticationToken {
    private static final long serialVersionUID = 1900286977895826147L;

    /**
     * Token
     */
    private String token;

    @Override
    public Object getPrincipal() {
        return token;
    }

    @Override
    public Object getCredentials() {
        return token;
    }
}
